package com.qiangesoft.bootcodegen.controller;

import com.qiangesoft.bootcodegen.constant.HtmlType;
import com.qiangesoft.bootcodegen.constant.QueryType;
import com.qiangesoft.bootcodegen.utils.KvVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 系统通用 前端控制器
 * </p>
 *
 * @author qiangesoft
 * @date 2024-03-28
 */
@Api(tags = "系统通用")
@RequiredArgsConstructor
@RestController
@RequestMapping("/common")
public class CommonController {

    @ApiOperation(value = "查询条件")
    @GetMapping("/query")
    public List<KvVO> query() {
        return QueryType.getValues();
    }

    @ApiOperation(value = "页面组件")
    @GetMapping("/html")
    public List<KvVO> html() {
        return HtmlType.getValues();
    }

}
